import Vue from "vue";
import router from "./router";
import store from "./store";
<<<<<<< HEAD
import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
=======
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
>>>>>>> 314b442cce11d658746227581b0160373004c345
import App from "./App";
import "./assets/styles/iconfont/iconfont.css";
import "./assets/styles/base.scss";
<<<<<<< HEAD
import "swiper/dist/css/swiper.css";
// import axios from 'axios'
import VueAxios from "vue-axios";
const axios = require("axios");
const ipaddr = "http://47.107.101.26:8081/yiqi-api";
Vue.prototype.$ajax = function(option) {
  const method = option.method || "get";

  axios({
    method: method,
    url: ipaddr + option.url,
    [/get/i.test(method) ? "params" : "data"]: option.data,
    headers: {
      "Content-Type": "application/json;charset=UTF-8",

      token: localStorage.getItem("Token") || ""
    }
  })
    .then(response => {
      option.success(response);
      // 对请求成功的状态码进行一些简易的筛选
      // if (response.data.code == 101) {

      // }
    })
    .catch(error => {
      console.log(error);
      option.fail;
    });
};
Vue.use(ElementUI, VueAxios, axios);
=======
import 'swiper/dist/css/swiper.css';
// import axios from 'axios'
import VueAxios from 'vue-axios'
const axios = require('axios')

const ipaddr = "http://47.107.101.26:8081/yiqi-api";
Vue.prototype.$ajax = function(option) {
  const method = option.method || 'get'
  
  axios({
    method: method,
    url: ipaddr + option.url,
    [/get/i.test(method) ? 'params' : 'data']: option.data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8',
     
      token: localStorage.getItem('Token') || '41543d4d298d40b3ae2d0459f869eaf1'
    }
  })
    .then(response => {
      option.success(response)
      // 对请求成功的状态码进行一些简易的筛选
      // if (response.data.code == 101) {

      // }
    })
    .catch(error => {
      console.log(error)
      option.fail
    })
}
Vue.use(ElementUI,VueAxios,axios);
>>>>>>> 314b442cce11d658746227581b0160373004c345
new Vue({
  el: "#app",
  router,
  store,
<<<<<<< HEAD

=======
 
>>>>>>> 314b442cce11d658746227581b0160373004c345
  render: h => h(App)
});
